In the computer science, a hash function is also referred to as a hashing function, which is used to convert different information with any length, such as numbers, texts or other information, into binary sequences with the same length but different content. Taking the SHA 256 algorithm as an example, input information with any length can be converted into a group of binary sequences with a length of 256 by the function, so as to be stored and identified uniformly. In addition, a probability that the same digital output is generated by the SHA256 from any two pieces of different input information is very little, since tiny change on the input information will result in great change on the output numbers. This ensures that there is a one-to-one-correspondence between the input information and the output numbers. In addition, it is quite difficult to deduce the input information from the output numbers. Therefore, if a particular output number is to be generated, only forward calculation one by one using a method of trying randomly can be adopted, and the input information can not be deduced from the output result reversely.
Peer to Peer (P2P) calculation may be simply defined as sharing computer resources and services by direct exchanging, and a network formed by an application layer of a P2P calculation model is generally referred as a P2P network. In a P2P network environment, thousands of computers connected to each other are peers, and generally the whole network does not need a dedicated centralized server.
In addition, during a process of information transferring, a public key infrastructure (referred to as PKI for short) may be used to ensure information security. Specifically, a sender encrypts information using a key; after receiving the information, a receiver decrypts the information using another paired key, thereby ensuring privacy and security during the information transferring process. The key may be a group of numbers or characters. The original information is converted into another format by performing a specific operation on the original information and the group of numbers or characters, thereby achieving encryption. The decryption process is just opposite. In most of cases, a group of keys are consisted of a public key and a private key. The private key is maintained personally, and the pubic key needs to be public to others. During the process of information transferring, the public key and the private key cooperate with each other, such that an identity of a sender holding the private key can be verified, and the sender can not deny the information sent by itself. Further, the integrity of transceiving information can be ensured, and the information is prevented from being intercepted and tampered during transmission. If the public key is lost, the public key can be recovered by the private key. However, it is impossible to deduce the private key from the public key theoretically, thereby ensuring privacy of the private key.
A concept of block chain is initially applied by Satoshi Nakamoto to the bitcoin technology which he proposed. The bitcoin is a digital currency in a form of P2P. P2P transmission means a decentralized payment system. In the bitcoin economy, all transaction behaviors are confirmed and recorded using a distributed database composed of many nodes in the whole P2P network, and a design of cryptology (such the hash function and the public key infrastructure described above) is used to ensure security during respective segments of currency circulation. The characteristic of decentralization of P2P and the algorithm itself can ensure that currency values can not be manipulated manually by manufacturing a great number of bitcoins. The design based on cryptology can ensure that the bitcoins can be transferred or paid only by the real holders. This also ensures anonymity of currency ownership and circulation transaction. The block chain is composed of a series of data blocks generated by a cryptology method, each block contains a hash value of a last block, and a current block is linked from an initial block, so as to form the block chain. It is ensured that each block is generated after the last block in a time order; otherwise the hash value of the last block is unknown. The block chain is extended continuously, and a new block would not be removed once added to the block chain. The block chain is actually a distributed database maintained by the whole P2P network platform, i.e., all participating client nodes, which records the whole transaction history of bitcoins.
Since each participating node in the network stores a copy of the block chain, it is essentially impossible to lose or tamper the block chain completely.